package com.asen.plf.service.impl;

import com.asen.commons.enums.ServiceNameEnum;
import com.asen.commons.utils.RestUtils;
import com.asen.plf.domain.Account;
import com.asen.plf.domain.User;
import com.asen.plf.service.UserService;
import com.asen.commons.core.base.service.impl.AbstractEnableBaseServiceImpl;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * 用户Service实现类
 *
 * @author ls
 * @date 2024-09-05
 */
@Service("userService")
@Transactional(rollbackFor = Exception.class)
public class UserServiceImpl extends AbstractEnableBaseServiceImpl<User> implements UserService {

    @Override
    protected void afterGet(User model) throws Exception {
        super.afterGet(model);
        Account account = RestUtils.get(ServiceNameEnum.ASEN_PLF.getValue(), "/inner/common/get?modelClass=" + Account.class.getName() + "&id=" + model.getAccountId(), Account.class);
        System.out.println(account);
    }
}
